package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    /**
     * sku基本信息
     * */
    private SkuInfoEntity info;
    /**
     * sku图片
     * */
    private List<SkuImagesEntity> images;
    /**
     * sku销售属性组合，比如颜色：红色，黑色，白色
     * */
    private List<SkuItemSaleAttrVo> saleAttr;
    /**
     * spu介绍
     * */
    private SpuInfoDescEntity desc;
    /**
     * spu分组属性信息
     * */
    private List<SpuItemAttrGroupVo> groupAttrs;

    private SeckillSkuInfoVo seckillSkuVo;

    @Data
    public static class SkuItemSaleAttrVo{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIds> attrValues;
    }

    @Data
    public static class SpuItemAttrGroupVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }
}
